<?php

if(! defined('OT_ROOT')) {
	exit('Access Denied');
}


// 网钛IDC财务管理系统(idcCMS) 景安网络接口

class ApiJingan{
	public static $appName = 'IDC接口_景安网络';
	public static $appID = 124;
	public static $apiUrl = 'http://api.zzidc.com/rest.api';	// 国内网站接口
	public static $apiHkUrl = 'http://dapi.zzidc.hk/rest.api';	// 香港国际网站接口
	public static $urlMode = 'cn';
	public static $accessId;
	public static $accessKey;
	private static $cmd;
	private static $versig;

	public static function Jud(){
		return false;
	}

	public static function DomainGetPrice($confArr, $isRetArr=true){
		return self::GetReturn();
	}

	public static function DomainRefer($confArr, $isRetArr=true){
		return self::GetReturn();
	}

	public static function DomainReg($confArr, $isRetArr=true){
		return self::GetReturn();
	}

	public static function DomainXufei($confArr, $isRetArr=true){
		return self::GetReturn();
	}

	public static function DomainSync($confArr=array(), $isRetArr=true){
		return self::GetReturn();
	}

	public static function DomainSyncOne($confArr, $isRetArr=true){
		return self::GetReturn();
	}

	public static function DomainPanel($confArr, $isRetArr=true){
		return self::GetReturn();
	}

	public static function DomainList($isRetArr=true){
		return self::GetReturn();
	}

	public static function HostBuy($confArr, $isRetArr=true){
		return self::GetReturn();
	}

	public static function HostKaitong($confArr, $isRetArr=true){
		return self::GetReturn();
	}

	public static function HostXufei($confArr, $isRetArr=true){
		return self::GetReturn();
	}

	public static function HostUpdate($confArr, $isRetArr=true){
		return self::GetReturn();
	}

	public static function HostShiyong($confArr, $isRetArr=true){
		return self::GetReturn();
	}

	public static function HostZhuanzheng($confArr, $isRetArr=true){
		return self::GetReturn();
	}

	public static function HostSync($confArr, $isRetArr=true){
		return self::GetReturn();
	}

	public static function HostSync2($confArr, $isRetArr=true){
		return self::GetReturn();
	}

	public static function VpsBuy($confArr, $isRetArr=true){
		return self::GetReturn();
	}

	public static function VpsKaitong($confArr, $isRetArr=true){
		return self::GetReturn();
	}

	public static function VpsXufei($confArr, $isRetArr=true){
		return self::GetReturn();
	}

	public static function VpsUpdate($confArr, $isRetArr=true){
		return self::GetReturn();
	}

	public static function VpsShiyong($confArr, $isRetArr=true){
		return self::GetReturn();
	}

	public static function VpsZhuanzheng($confArr, $isRetArr=true){
		return self::GetReturn();
	}

	public static function GetSystemList($confArr=array(), $isRetArr=true){
		return self::GetReturn();
	}

	public static function VpsSync($confArr, $isRetArr=true){
		return self::GetReturn();
	}

	public static function VpsWorkId($confArr, $isRetArr=true){
		return self::GetReturn();
	}

	public static function GetVpsList($confArr=array(), $isRetArr=true){
		return self::GetReturn();
	}

	public static function VpsSync2($confArr, $isRetArr=true){
		return self::GetReturn();
	}

	public static function UseTestCode($confArr, $isRetArr=true){
		return self::GetReturn();
	}

	public static function Auth($confArr, $isRetArr=true){
		return self::GetReturn();
	}

	public static function GetBaoxiaoNum($confArr, $isRetArr=true){
		return self::GetReturn();
	}

	public static function GetBaoxiaoOrder($confArr, $isRetArr=true){
		return self::GetReturn();
	}

	public static function GetServCode($confArr, $isRetArr=true){
		return self::GetReturn();
	}

	public static function PanelKey($confArr, $isRetArr=true){
		return self::GetReturn();
	}

	public static function GetReturn(){
		return array('res'=>false, 'ori'=>'', 'note'=>'该插件无权限');
	}

	
	public static function HostSysModeNum($str){
		if ($str == 'linux'){
			return 0;
		}else{
			return 1;
		}
	}
	
	public static function HostSysModeStr($num){
		if ($num == 0){
			return 'linux';
		}else{
			return 'window';
		}
	}

	public static function VpsAreaCode($num, $sysMode=''){
		if ($num == 4003 && $sysMode != 'fast.cloudvps.jichu'){
			return 4003;	// 北京
		}else{
			return 4001;	// 郑州
		}
	}

	public static function VpsSysModeNum($system, $pname=''){
		if ($system == 'linux'){
			return 1;
		}elseif ($system == 'win2008' && $pname != 'fast.cloudvps.jichu'){
			return 2;
		}elseif ($system == 'win2003'){
			return 0;
		}else{
			return $system;
		}
	}
	
	public static function VpsSysModeStr($num){
		if ($num == 1){
			return 'linux';
		}elseif ($num == 2){
			return 'win2008';
		}elseif ($num == 0){
			return 'win2003';
		}else{
			return $num;
		}
	}


	public static function PayModeMonthNum($str){
		switch ($str){
			case '24hour': case '48hour':	return 0;
			case 'month':		return 1;
			case '3month':		return 3;
			case '6month':		return 6;
			case 'year':		return 12;
			case '2year':		return 24;
			case '3year':		return 36;
			case '4year':		return 48;
			case '5year':		return 60;
			case '10year':		return 120;
			default :			return -1;
		}
	}

	public static function PayModeMonthStr($num){
		switch ($num){
			case 0:			return '24hour';
			case 1:			return 'month';
			case 3:			return '3month';
			case 6:			return '6month';
			case 12:		return 'year';
			case 24:		return '2year';
			case 36:		return '3year';
			case 48:		return '4year';
			case 60:		return '5year';
			case 120:		return '10year';
			default :		return 'un'. $num;
		}
	}
}
?>